<?php

if (isset($_POST['name']))
{
$admin_email = "msangui@gmail.com";
$to = $admin_email;
$sub = "Nuevo contacto";
$msg = "
<html>
<body>
<h1>Nuevo contacto</h1>
	<p>Nombre: ".$_POST['name']."</p>
	<p>Empresa: ".$_POST['enterprise']."</p>
	<p>E-mail: ".$_POST['email']."</p>
	<p>Tel: ".$_POST['phone']."</p>
	<p>Mensaje: ".$_POST['message']."</p>
</body>
</html>
";

$headers = array("From: Locos XlasMotos <$admin_email>",
			 "Content-Type: text/html"
			 );
$h = implode("\r\n",$headers) . "\r\n";
mail($to,$sub,$msg,$h);
}
header("Location: enviado");
